{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"SFdvpEoOEM2r","executionInfo":{"status":"ok","timestamp":1671695973027,"user_tz":-420,"elapsed":968,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"ab3fde51-c4b5-494a-f6b3-758723d3ad2e","colab":{"base_uri":"https://localhost:8080/"}},"outputs":[{"output_type":"stream","name":"stdout","text":["Thu Dec 22 07:59:32 2022       \n","+-----------------------------------------------------------------------------+\n","| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |\n","|-------------------------------+----------------------+----------------------+\n","| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n","| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n","|                               |                      |               MIG M. |\n","|===============================+======================+======================|\n","|   0  Tesla T4            Off  | 00000000:00:04.0 Off |                    0 |\n","| N/A   55C    P0    29W /  70W |      0MiB / 15109MiB |      0%      Default |\n","|                               |                      |                  N/A |\n","+-------------------------------+----------------------+----------------------+\n","                                                                               \n","+-----------------------------------------------------------------------------+\n","| Processes:                                                                  |\n","|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |\n","|        ID   ID                                                   Usage      |\n","|=============================================================================|\n","|  No running processes found                                                 |\n","+-----------------------------------------------------------------------------+\n"]}],"source":["!nvidia-smi"]},{"cell_type":"markdown","source":["# **Install**"],"metadata":{"id":"TuXd7Ngpb93o"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"cVJhdJvKap_x","executionInfo":{"status":"ok","timestamp":1671695979617,"user_tz":-420,"elapsed":2754,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"bef2c720-f794-446e-b38b-9a83ce24e7b5","colab":{"base_uri":"https://localhost:8080/"}},"outputs":[{"output_type":"stream","name":"stdout","text":["Cloning into 'tph-yolov5'...\n","remote: Enumerating objects: 297, done.\u001b[K\n","remote: Counting objects: 100% (297/297), done.\u001b[K\n","remote: Compressing objects: 100% (184/184), done.\u001b[K\n","remote: Total 297 (delta 138), reused 237 (delta 109), pack-reused 0\u001b[K\n","Receiving objects: 100% (297/297), 6.05 MiB | 6.18 MiB/s, done.\n","Resolving deltas: 100% (138/138), done.\n"]}],"source":["!git clone https://github.com/manhhv87/tph-yolov5.git"]},{"cell_type":"code","source":["%cd tph-yolov5"],"metadata":{"id":"LthyPK5DYn1R","executionInfo":{"status":"ok","timestamp":1671695986919,"user_tz":-420,"elapsed":415,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"8363748b-8924-46f8-fbcf-04d60a4e42b4","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["/content/tph-yolov5\n"]}]},{"cell_type":"code","source":["!pip install -r requirements.txt"],"metadata":{"id":"VVMgCRhpYv-a","executionInfo":{"status":"ok","timestamp":1671695996989,"user_tz":-420,"elapsed":9673,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"7fa2c3b0-3594-4406-a658-44fbe9b70ea5","colab":{"base_uri":"https://localhost:8080/"}},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n","Requirement already satisfied: matplotlib>=3.2.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 4)) (3.2.2)\n","Requirement already satisfied: numpy>=1.18.5 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 5)) (1.21.6)\n","Requirement already satisfied: opencv-python>=4.1.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 6)) (4.6.0.66)\n","Requirement already satisfied: Pillow>=7.1.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 7)) (7.1.2)\n","Requirement already satisfied: PyYAML>=5.3.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 8)) (6.0)\n","Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 9)) (2.23.0)\n","Requirement already satisfied: scipy>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 10)) (1.7.3)\n","Requirement already satisfied: torch>=1.7.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 11)) (1.13.0+cu116)\n","Requirement already satisfied: torchvision>=0.8.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 12)) (0.14.0+cu116)\n","Requirement already satisfied: tqdm>=4.41.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 13)) (4.64.1)\n","Requirement already satisfied: tensorboard>=2.4.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 16)) (2.9.1)\n","Collecting wandb\n","  Downloading wandb-0.13.7-py2.py3-none-any.whl (1.9 MB)\n","\u001b[K     |████████████████████████████████| 1.9 MB 5.0 MB/s \n","\u001b[?25hRequirement already satisfied: pandas>=1.1.4 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 20)) (1.3.5)\n","Requirement already satisfied: seaborn>=0.11.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 21)) (0.11.2)\n","Requirement already satisfied: albumentations>=1.0.3 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 32)) (1.2.1)\n","Collecting thop\n","  Downloading thop-0.1.1.post2209072238-py3-none-any.whl (15 kB)\n","Collecting ensemble_boxes\n","  Downloading ensemble_boxes-1.0.9-py3-none-any.whl (23 kB)\n","Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (0.11.0)\n","Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (2.8.2)\n","Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (3.0.9)\n","Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=3.2.2->-r requirements.txt (line 4)) (1.4.4)\n","Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (1.24.3)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2022.12.7)\n","Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (3.0.4)\n","Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.23.0->-r requirements.txt (line 9)) (2.10)\n","Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from torch>=1.7.0->-r requirements.txt (line 11)) (4.4.0)\n","Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (3.4.1)\n","Requirement already satisfied: protobuf<3.20,>=3.9.2 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (3.19.6)\n","Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (0.6.1)\n","Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.8.1)\n","Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (57.4.0)\n","Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (2.15.0)\n","Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.3.0)\n","Requirement already satisfied: grpcio>=1.24.3 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.51.1)\n","Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.0.1)\n","Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (0.38.4)\n","Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.8/dist-packages (from tensorboard>=2.4.1->-r requirements.txt (line 16)) (0.4.6)\n","Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas>=1.1.4->-r requirements.txt (line 20)) (2022.6)\n","Requirement already satisfied: opencv-python-headless>=4.1.1 in /usr/local/lib/python3.8/dist-packages (from albumentations>=1.0.3->-r requirements.txt (line 32)) (4.6.0.66)\n","Requirement already satisfied: scikit-image>=0.16.1 in /usr/local/lib/python3.8/dist-packages (from albumentations>=1.0.3->-r requirements.txt (line 32)) (0.18.3)\n","Requirement already satisfied: qudida>=0.0.4 in /usr/local/lib/python3.8/dist-packages (from albumentations>=1.0.3->-r requirements.txt (line 32)) (0.0.4)\n","Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 16)) (4.9)\n","Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 16)) (5.2.0)\n","Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.15.0)\n","Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 16)) (0.2.8)\n","Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.8/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r requirements.txt (line 16)) (1.3.1)\n","Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.8/dist-packages (from markdown>=2.6.8->tensorboard>=2.4.1->-r requirements.txt (line 16)) (5.1.0)\n","Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard>=2.4.1->-r requirements.txt (line 16)) (3.11.0)\n","Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.8/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.4.1->-r requirements.txt (line 16)) (0.4.8)\n","Requirement already satisfied: scikit-learn>=0.19.1 in /usr/local/lib/python3.8/dist-packages (from qudida>=0.0.4->albumentations>=1.0.3->-r requirements.txt (line 32)) (1.0.2)\n","Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=2.4.1->-r requirements.txt (line 16)) (3.2.2)\n","Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.16.1->albumentations>=1.0.3->-r requirements.txt (line 32)) (2022.10.10)\n","Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.16.1->albumentations>=1.0.3->-r requirements.txt (line 32)) (2.8.8)\n","Requirement already satisfied: imageio>=2.3.0 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.16.1->albumentations>=1.0.3->-r requirements.txt (line 32)) (2.9.0)\n","Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from scikit-image>=0.16.1->albumentations>=1.0.3->-r requirements.txt (line 32)) (1.4.1)\n","Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.19.1->qudida>=0.0.4->albumentations>=1.0.3->-r requirements.txt (line 32)) (1.2.0)\n","Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from scikit-learn>=0.19.1->qudida>=0.0.4->albumentations>=1.0.3->-r requirements.txt (line 32)) (3.1.0)\n","Collecting pathtools\n","  Downloading pathtools-0.1.2.tar.gz (11 kB)\n","Collecting shortuuid>=0.5.0\n","  Downloading shortuuid-1.0.11-py3-none-any.whl (10 kB)\n","Collecting docker-pycreds>=0.4.0\n","  Downloading docker_pycreds-0.4.0-py2.py3-none-any.whl (9.0 kB)\n","Collecting GitPython>=1.0.0\n","  Downloading GitPython-3.1.29-py3-none-any.whl (182 kB)\n","\u001b[K     |████████████████████████████████| 182 kB 80.4 MB/s \n","\u001b[?25hRequirement already satisfied: Click!=8.0.0,>=7.0 in /usr/local/lib/python3.8/dist-packages (from wandb->-r requirements.txt (line 17)) (7.1.2)\n","Collecting sentry-sdk>=1.0.0\n","  Downloading sentry_sdk-1.12.1-py2.py3-none-any.whl (174 kB)\n","\u001b[K     |████████████████████████████████| 174 kB 98.2 MB/s \n","\u001b[?25hCollecting setproctitle\n","  Downloading setproctitle-1.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31 kB)\n","Requirement already satisfied: psutil>=5.0.0 in /usr/local/lib/python3.8/dist-packages (from wandb->-r requirements.txt (line 17)) (5.4.8)\n","Requirement already satisfied: promise<3,>=2.0 in /usr/local/lib/python3.8/dist-packages (from wandb->-r requirements.txt (line 17)) (2.3)\n","Collecting gitdb<5,>=4.0.1\n","  Downloading gitdb-4.0.10-py3-none-any.whl (62 kB)\n","\u001b[K     |████████████████████████████████| 62 kB 1.6 MB/s \n","\u001b[?25hCollecting smmap<6,>=3.0.1\n","  Downloading smmap-5.0.0-py3-none-any.whl (24 kB)\n","Collecting sentry-sdk>=1.0.0\n","  Downloading sentry_sdk-1.12.0-py2.py3-none-any.whl (173 kB)\n","\u001b[K     |████████████████████████████████| 173 kB 95.5 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.11.1-py2.py3-none-any.whl (168 kB)\n","\u001b[K     |████████████████████████████████| 168 kB 93.2 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.11.0-py2.py3-none-any.whl (168 kB)\n","\u001b[K     |████████████████████████████████| 168 kB 78.9 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.10.1-py2.py3-none-any.whl (166 kB)\n","\u001b[K     |████████████████████████████████| 166 kB 86.1 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.10.0-py2.py3-none-any.whl (166 kB)\n","\u001b[K     |████████████████████████████████| 166 kB 93.1 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.10-py2.py3-none-any.whl (162 kB)\n","\u001b[K     |████████████████████████████████| 162 kB 84.6 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.9-py2.py3-none-any.whl (162 kB)\n","\u001b[K     |████████████████████████████████| 162 kB 71.2 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.8-py2.py3-none-any.whl (158 kB)\n","\u001b[K     |████████████████████████████████| 158 kB 91.4 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.7-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 88.8 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.6-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 73.4 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.5-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 103.7 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.4-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 85.2 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.3-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 108.1 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.2-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 104.3 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.1-py2.py3-none-any.whl (157 kB)\n","\u001b[K     |████████████████████████████████| 157 kB 83.4 MB/s \n","\u001b[?25h  Downloading sentry_sdk-1.9.0-py2.py3-none-any.whl (156 kB)\n","\u001b[K     |████████████████████████████████| 156 kB 92.6 MB/s \n","\u001b[?25hRequirement already satisfied: numba in /usr/local/lib/python3.8/dist-packages (from ensemble_boxes->-r requirements.txt (line 37)) (0.56.4)\n","Requirement already satisfied: llvmlite<0.40,>=0.39.0dev0 in /usr/local/lib/python3.8/dist-packages (from numba->ensemble_boxes->-r requirements.txt (line 37)) (0.39.1)\n","Building wheels for collected packages: pathtools\n","  Building wheel for pathtools (setup.py) ... \u001b[?25l\u001b[?25hdone\n","  Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8806 sha256=d903ab8e93c7a7263b685c1de533291908f62c0e827fdc43563d643b4e91193a\n","  Stored in directory: /root/.cache/pip/wheels/4c/8e/7e/72fbc243e1aeecae64a96875432e70d4e92f3d2d18123be004\n","Successfully built pathtools\n","Installing collected packages: smmap, gitdb, shortuuid, setproctitle, sentry-sdk, pathtools, GitPython, docker-pycreds, wandb, thop, ensemble-boxes\n","Successfully installed GitPython-3.1.29 docker-pycreds-0.4.0 ensemble-boxes-1.0.9 gitdb-4.0.10 pathtools-0.1.2 sentry-sdk-1.9.0 setproctitle-1.3.2 shortuuid-1.0.11 smmap-5.0.0 thop-0.1.1.post2209072238 wandb-0.13.7\n"]}]},{"cell_type":"markdown","source":["# **Train**\n","train.py allows you to train new model from strach."],"metadata":{"id":"h-uUQdogapnO"}},{"cell_type":"code","source":["!python train.py --img-size 2544 --cfg yolov5s-tph.yaml --hyp hyp.scratch.yaml --adam --batch-size 4 --epochs 100 --data pcb_data.yaml --weights yolov5s.pt --name yolo_pcb_det"],"metadata":{"id":"Lv6RIyvGkrNF","colab":{"base_uri":"https://localhost:8080/"},"outputId":"7be04457-6864-479d-e4ef-63e9087ebbf7","executionInfo":{"status":"ok","timestamp":1671714770447,"user_tz":-420,"elapsed":3260110,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}}},"execution_count":6,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[34m\u001b[1mwandb\u001b[0m: (1) Create a W&B account\n","\u001b[34m\u001b[1mwandb\u001b[0m: (2) Use an existing W&B account\n","\u001b[34m\u001b[1mwandb\u001b[0m: (3) Don't visualize my results\n","\u001b[34m\u001b[1mwandb\u001b[0m: Enter your choice: (30 second timeout) 3\n","\u001b[34m\u001b[1mwandb\u001b[0m: You chose 'Don't visualize my results'\n","\u001b[34m\u001b[1mtrain: \u001b[0mweights=yolov5s.pt, cfg=yolov5s-tph.yaml, data=pcb_data.yaml, hyp=hyp.scratch.yaml, epochs=100, batch_size=4, imgsz=2544, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, adam=True, sync_bn=False, workers=8, project=runs/train, name=yolo_pcb_det, exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, patience=100, freeze=0, save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n","fatal: ambiguous argument 'main..origin/master': unknown revision or path not in the working tree.\n","Use '--' to separate paths from revisions, like this:\n","'git <command> [<revision>...] -- [<file>...]'\n","\u001b[34m\u001b[1mgithub: \u001b[0mCommand 'git rev-list main..origin/master --count' returned non-zero exit status 128.\n","YOLOv5 🚀 438c589 torch 1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n","\n","\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.1, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n","\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n","\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n","Overriding model.yaml nc=80 with nc=6\n","\n","                 from  n    params  module                                  arguments                     \n","  0                -1  1      3520  models.common.Conv                      [3, 32, 6, 2, 2]              \n","  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                \n","  2                -1  1     18816  models.common.C3                        [64, 64, 1]                   \n","  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n","  4                -1  2    115712  models.common.C3                        [128, 128, 2]                 \n","  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n","  6                -1  3    625152  models.common.C3                        [256, 256, 3]                 \n","  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]              \n","  8                -1  1   1317128  models.common.C3STR                     [512, 512, 1]                 \n","  9                -1  1    656896  models.common.SPPF                      [512, 512, 5]                 \n"," 10                -1  1    263168  models.common.Conv                      [512, 512, 1, 1]              \n"," 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n"," 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n"," 13                -1  1    427520  models.common.C3                        [768, 256, 1, False]          \n"," 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              \n"," 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n"," 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n"," 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]          \n"," 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              \n"," 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n"," 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]          \n"," 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]              \n"," 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n"," 23                -1  1   1313792  models.common.C3                        [768, 512, 1, False]          \n"," 24      [17, 20, 23]  1     29667  models.yolo.Detect                      [6, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]\n","Model Summary: 278 layers, 7498411 parameters, 7498411 gradients, 29.8 GFLOPs\n","\n","Transferred 321/350 items from yolov5s.pt\n","WARNING: --img-size 2544 must be multiple of max stride 32, updating to 2560\n","Scaled weight_decay = 0.0005\n","\u001b[34m\u001b[1moptimizer:\u001b[0m Adam with parameter groups 55 weight, 64 weight (no decay), 63 bias\n","\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.3, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.3, clip_limit=(1, 4.0), tile_grid_size=(8, 8)), RandomBrightnessContrast(always_apply=False, p=0.3, brightness_limit=(-0.2, 0.2), contrast_limit=(-0.2, 0.2), brightness_by_max=True)\n","\u001b[34m\u001b[1mtrain: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/train.cache' images and labels... 554 found, 0 missing, 0 empty, 0 corrupted: 100% 554/554 [00:00<?, ?it/s]\n","\u001b[34m\u001b[1mval: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/val.cache' images and labels... 69 found, 0 missing, 0 empty, 0 corrupted: 100% 69/69 [00:00<?, ?it/s]\n","Plotting labels... \n","\n","\u001b[34m\u001b[1mautoanchor: \u001b[0mAnalyzing anchors... anchors/target = 6.03, Best Possible Recall (BPR) = 1.0000\n","Image sizes 2560 train, 2560 val\n","Using 4 dataloader workers\n","Logging results to \u001b[1mruns/train/yolo_pcb_det2\u001b[0m\n","Starting training for 100 epochs...\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      0/99     13.8G   0.08745    0.1028   0.05135        23      2560: 100% 139/139 [02:54<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.17it/s]\n","                 all         69          0          0          0          0          0\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      1/99     12.4G   0.07312   0.06651   0.04857        15      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:09<00:00,  1.07s/it]\n","                 all         69        285      0.148      0.387      0.202     0.0606\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      2/99     12.4G   0.06535   0.04871   0.04514        24      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.148      0.659      0.205     0.0593\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      3/99     12.4G   0.06013    0.0418   0.04215        12      2560: 100% 139/139 [02:49<00:00,  1.22s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.17it/s]\n","                 all         69        285       0.23      0.668      0.315      0.107\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      4/99     12.4G    0.0573   0.04028   0.04031         9      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.283      0.532      0.446      0.174\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      5/99     12.4G   0.05394   0.03942   0.03829        13      2560: 100% 139/139 [02:47<00:00,  1.21s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.349      0.554      0.431      0.173\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      6/99     12.4G   0.05154   0.03897   0.03674         8      2560: 100% 139/139 [02:47<00:00,  1.21s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.356      0.684      0.518       0.21\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      7/99     12.4G   0.04916   0.03855    0.0356         1      2560: 100% 139/139 [02:49<00:00,  1.22s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.444      0.679      0.572      0.238\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      8/99     12.4G   0.04799   0.03617   0.03259        13      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.22it/s]\n","                 all         69        285       0.45      0.779      0.637      0.265\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","      9/99     12.4G   0.04645   0.03788   0.03029        16      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.546      0.779      0.692      0.279\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     10/99     12.4G   0.04693   0.03876   0.02662        11      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.683      0.728      0.734      0.309\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     11/99     12.4G   0.04726    0.0344   0.02391        10      2560: 100% 139/139 [02:55<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.605      0.864      0.796      0.337\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     12/99     12.4G    0.0462   0.03621   0.02063        10      2560: 100% 139/139 [02:47<00:00,  1.21s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.666      0.892      0.786      0.335\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     13/99     12.4G   0.04493   0.03574   0.01824        18      2560: 100% 139/139 [02:47<00:00,  1.20s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.807        0.9      0.909      0.382\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     14/99     12.4G   0.04598   0.03426   0.01535        29      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.779      0.914      0.894      0.368\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     15/99     12.4G   0.04718   0.03412   0.01327         5      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.836      0.931      0.931       0.38\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     16/99     12.4G   0.04409   0.03412   0.01104         3      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.22it/s]\n","                 all         69        285      0.924      0.924       0.95      0.403\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     17/99     12.4G   0.04276   0.03403  0.009238         8      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.947      0.956      0.965      0.447\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     18/99     12.4G   0.04239   0.03357  0.007684        23      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.941      0.971       0.97      0.458\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     19/99     12.4G   0.04145    0.0333  0.007132        19      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.17it/s]\n","                 all         69        285      0.947      0.959      0.967      0.427\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     20/99     12.4G   0.04059   0.03301  0.005962         7      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.946      0.973      0.979      0.468\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     21/99     12.4G   0.04003   0.03249  0.005247        15      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.958      0.972      0.977       0.46\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     22/99     12.4G   0.03908   0.03162  0.004508        10      2560: 100% 139/139 [02:57<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.946       0.94      0.961      0.444\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     23/99     12.4G   0.03821   0.03199  0.004052         7      2560: 100% 139/139 [02:57<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.15it/s]\n","                 all         69        285       0.98      0.984      0.986      0.464\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     24/99     12.4G   0.03874   0.03224  0.003756        10      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.961      0.959      0.964      0.486\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     25/99     12.4G   0.03848    0.0305  0.003047         8      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.965      0.973      0.973      0.456\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     26/99     12.4G   0.03834   0.03018  0.003429        12      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.975      0.976       0.98      0.501\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     27/99     12.4G   0.03845   0.03137  0.003462         7      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.967      0.981      0.971      0.504\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     28/99     12.4G    0.0378   0.03054  0.003019         7      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.969      0.979      0.973        0.5\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     29/99     12.4G   0.03699    0.0307  0.002941         8      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.956      0.963      0.967      0.453\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     30/99     12.4G   0.03663   0.03022  0.002569         4      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.966      0.976      0.974      0.495\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     31/99     12.4G   0.03766   0.03209  0.002384        24      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285       0.97      0.966      0.961      0.482\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     32/99     12.4G   0.03741   0.03149  0.002496        20      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.935      0.974      0.968      0.453\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     33/99     12.4G   0.03653    0.0317  0.002342        20      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.976      0.969      0.974      0.503\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     34/99     12.4G   0.03616   0.03012  0.002124        17      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.958      0.963      0.965      0.495\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     35/99     12.4G   0.03498   0.03043  0.002272        16      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285       0.97      0.988      0.984      0.514\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     36/99     12.4G   0.03454   0.02917  0.001923         8      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.977      0.982      0.981      0.514\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     37/99     12.4G   0.03462   0.03002  0.001928         7      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285       0.98      0.979      0.976      0.513\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     38/99     12.4G   0.03452   0.03012  0.001666        20      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.964      0.975       0.97      0.514\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     39/99     12.4G   0.03547   0.02984   0.00199        16      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.966      0.979      0.978      0.513\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     40/99     12.4G   0.03451   0.02986  0.001821        11      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.966       0.98      0.974      0.492\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     41/99     12.4G   0.03445   0.02807  0.001691         5      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.972      0.987      0.981      0.517\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     42/99     12.4G   0.03432   0.03021  0.001829        19      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.972      0.987      0.981      0.509\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     43/99     12.4G   0.03374   0.02915  0.001757        14      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.979      0.989      0.981      0.525\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     44/99     12.4G   0.03351   0.02902  0.001797        12      2560: 100% 139/139 [02:54<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.22it/s]\n","                 all         69        285       0.98       0.98      0.976      0.517\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     45/99     12.4G   0.03262   0.02893  0.001745        16      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285       0.97      0.976       0.98      0.518\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     46/99     12.4G   0.03321   0.02977  0.001752        11      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.981      0.983      0.977      0.531\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     47/99     12.4G   0.03278   0.02842   0.00159        15      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.964      0.982      0.974       0.52\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     48/99     12.4G   0.03216   0.02862   0.00165        24      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.981      0.979       0.98      0.524\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     49/99     12.4G   0.03167   0.02786  0.001487        16      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.975      0.972      0.978      0.514\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     50/99     12.4G    0.0324   0.02895    0.0015         7      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.16it/s]\n","                 all         69        285      0.978      0.985      0.979      0.523\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     51/99     12.4G   0.03212   0.02865  0.001387        33      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.969       0.98      0.974      0.527\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     52/99     12.4G   0.03199   0.02981  0.001411        15      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.967      0.971      0.973       0.52\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     53/99     12.4G   0.03155   0.02892  0.001262        16      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.22it/s]\n","                 all         69        285      0.981      0.979      0.984      0.529\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     54/99     12.4G   0.03166   0.02996  0.001521         9      2560: 100% 139/139 [02:55<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285       0.98      0.992       0.98      0.521\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     55/99     12.4G   0.03112   0.02931  0.001352         9      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.981       0.99      0.982       0.52\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     56/99     12.4G   0.03043   0.02784  0.001266         8      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.976      0.988      0.979      0.534\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     57/99     12.4G   0.03129   0.02991  0.001512         9      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.983      0.984       0.98      0.526\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     58/99     12.4G   0.03128   0.02819  0.001248         8      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285       0.98      0.988      0.982      0.537\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     59/99     12.4G   0.03135   0.02808  0.001227        20      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285       0.98      0.991      0.982      0.521\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     60/99     12.4G   0.03138   0.02852  0.001207         8      2560: 100% 139/139 [02:54<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.22it/s]\n","                 all         69        285      0.971      0.975      0.966      0.529\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     61/99     12.4G   0.03087   0.02978  0.001299        27      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.17it/s]\n","                 all         69        285       0.98      0.982      0.981      0.522\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     62/99     12.4G   0.03047   0.02863   0.00122        10      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.978      0.986       0.98      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     63/99     12.4G   0.03054   0.02769   0.00121        10      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.973      0.978      0.976      0.532\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     64/99     12.4G   0.02967   0.02886   0.00122         8      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.983      0.987      0.981      0.536\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     65/99     12.4G   0.02986   0.02849  0.001211        28      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.976      0.984      0.979      0.526\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     66/99     12.4G    0.0299   0.02965  0.001169        23      2560: 100% 139/139 [02:51<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.983      0.989      0.985      0.543\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     67/99     12.4G   0.03015   0.02748  0.001155         9      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.24it/s]\n","                 all         69        285      0.981      0.983       0.98      0.538\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     68/99     12.4G   0.03017   0.02829    0.0012        12      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.987       0.98      0.981       0.53\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     69/99     12.4G   0.02994     0.029  0.001202         8      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285       0.98       0.98      0.973      0.536\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     70/99     12.4G   0.02951   0.02789  0.001106        21      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.986      0.986       0.98      0.545\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     71/99     12.4G   0.02956   0.02847  0.001218         5      2560: 100% 139/139 [02:50<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.982      0.984      0.978       0.53\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     72/99     12.4G   0.02965   0.02902  0.001063        25      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.985      0.986      0.982      0.543\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     73/99     12.4G   0.03023   0.02828   0.00122        13      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.986      0.985      0.981      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     74/99     12.4G   0.03022   0.02738  0.001183        23      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.986      0.985      0.981      0.549\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     75/99     12.4G   0.03006   0.02711 0.0009624         7      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.18it/s]\n","                 all         69        285      0.983      0.981      0.977      0.526\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     76/99     12.4G   0.02961   0.02951  0.001092        11      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285       0.98      0.976      0.973      0.535\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     77/99     12.4G    0.0284   0.02817  0.001053        10      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.982      0.983      0.974       0.53\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     78/99     12.4G   0.02844   0.02745   0.00106        12      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.982      0.983      0.976      0.532\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     79/99     12.4G   0.02862   0.02684  0.000977         5      2560: 100% 139/139 [02:51<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.983      0.982      0.975      0.541\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     80/99     12.4G   0.02871   0.02759  0.001017        16      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.16it/s]\n","                 all         69        285      0.986      0.986       0.98      0.548\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     81/99     12.4G   0.02836   0.02719  0.001013         4      2560: 100% 139/139 [02:52<00:00,  1.24s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.984      0.986      0.981      0.543\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     82/99     12.4G   0.02787   0.02694 0.0009628        16      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.981      0.986       0.98      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     83/99     12.4G   0.02757   0.02621  0.001141        12      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.986      0.986      0.981      0.548\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     84/99     12.4G     0.028   0.02682   0.00109         5      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.985      0.986      0.981      0.544\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     85/99     12.4G   0.02804   0.02649 0.0008816        12      2560: 100% 139/139 [02:57<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.17it/s]\n","                 all         69        285      0.982      0.983      0.975      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     86/99     12.4G   0.02811   0.02746 0.0009794         4      2560: 100% 139/139 [02:59<00:00,  1.29s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.983      0.983      0.979      0.537\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     87/99     12.4G   0.02762   0.02765 0.0007473        10      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.983      0.983       0.98      0.535\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     88/99     12.4G   0.02801   0.02746  0.000814         5      2560: 100% 139/139 [03:00<00:00,  1.30s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.982      0.983      0.975      0.541\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     89/99     12.4G   0.02786   0.02673  0.001008        22      2560: 100% 139/139 [02:58<00:00,  1.28s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285      0.985      0.986      0.981      0.531\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     90/99     12.4G   0.02766   0.02677 0.0007748        14      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.16it/s]\n","                 all         69        285      0.982      0.983      0.975      0.545\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     91/99     12.4G   0.02745   0.02753 0.0008634        12      2560: 100% 139/139 [02:55<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.23it/s]\n","                 all         69        285      0.986      0.986      0.981      0.552\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     92/99     12.4G   0.02762   0.02618 0.0008333         4      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.982      0.983      0.975      0.547\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     93/99     12.4G   0.02724   0.02725 0.0007204        20      2560: 100% 139/139 [02:51<00:00,  1.23s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.982      0.983      0.975      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     94/99     12.4G   0.02743   0.02766 0.0008331         6      2560: 100% 139/139 [02:57<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.982      0.983      0.976      0.545\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     95/99     12.4G   0.02776   0.02687 0.0007706        15      2560: 100% 139/139 [02:54<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.24it/s]\n","                 all         69        285      0.985      0.991      0.986      0.545\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     96/99     12.4G   0.02715   0.02593  0.001018        21      2560: 100% 139/139 [02:54<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.19it/s]\n","                 all         69        285      0.983      0.983      0.976      0.544\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     97/99     12.4G   0.02729   0.02673 0.0009322        10      2560: 100% 139/139 [02:54<00:00,  1.26s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.982      0.983      0.975      0.542\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     98/99     12.4G   0.02745   0.02818  0.001174        19      2560: 100% 139/139 [02:56<00:00,  1.27s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.20it/s]\n","                 all         69        285       0.98      0.991      0.985      0.538\n","\n","     Epoch   gpu_mem       box       obj       cls    labels  img_size\n","     99/99     12.4G    0.0274   0.02717  0.001041        17      2560: 100% 139/139 [02:53<00:00,  1.25s/it]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:07<00:00,  1.21it/s]\n","                 all         69        285      0.982      0.983      0.975      0.534\n","\n","100 epochs completed in 5.071 hours.\n","Optimizer stripped from runs/train/yolo_pcb_det2/weights/last.pt, 18.5MB\n","Optimizer stripped from runs/train/yolo_pcb_det2/weights/best.pt, 18.5MB\n","\n","Validating runs/train/yolo_pcb_det2/weights/best.pt...\n","Fusing layers... \n","Model Summary: 223 layers, 7489163 parameters, 0 gradients, 29.6 GFLOPs\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:09<00:00,  1.11s/it]\n","                 all         69        285      0.986      0.986      0.981      0.551\n","        missing_hole         69         55      0.981          1      0.987      0.639\n","          mouse_bite         69         42      0.975          1      0.987      0.551\n","        open_circuit         69         35      0.997          1      0.995      0.524\n","               short         69         67      0.985          1       0.99      0.529\n","                spur         69         36          1      0.917      0.944      0.536\n","     spurious_copper         69         50       0.98          1      0.981       0.53\n","Results saved to \u001b[1mruns/train/yolo_pcb_det2\u001b[0m\n"]}]},{"cell_type":"markdown","source":["# **Inference**"],"metadata":{"id":"sMie2qV3tP1H"}},{"cell_type":"code","source":["!python val.py --weights ./runs/train/yolo_pcb_det2/weights/best.pt --img-size 2544 --data ./data/pcb_data.yaml --augment --save-txt --save-conf --task val --batch-size 2 --verbose --name v5s"],"metadata":{"id":"K4-ka-vc3tuS","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1671714901183,"user_tz":-420,"elapsed":41297,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"f175406c-23b6-402c-87e8-b0dae2b1b4eb"},"execution_count":7,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[34m\u001b[1mval: \u001b[0mdata=./data/pcb_data.yaml, weights=['./runs/train/yolo_pcb_det2/weights/best.pt'], batch_size=2, imgsz=2544, conf_thres=0.001, iou_thres=0.6, task=val, device=, single_cls=False, augment=True, verbose=True, save_txt=True, save_hybrid=False, save_conf=True, save_json=False, project=runs/val, name=v5s, exist_ok=False, half=False\n","YOLOv5 🚀 438c589 torch 1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n","\n","Fusing layers... \n","Model Summary: 223 layers, 7489163 parameters, 0 gradients, 29.6 GFLOPs\n","WARNING: --img-size 2544 must be multiple of max stride 32, updating to 2560\n","\u001b[34m\u001b[1mval: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/val.cache' images and labels... 69 found, 0 missing, 0 empty, 0 corrupted: 100% 69/69 [00:00<?, ?it/s]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 35/35 [00:28<00:00,  1.22it/s]\n","                 all         69        285      0.969      0.973      0.975      0.538\n","        missing_hole         69         55       0.98          1      0.981      0.605\n","          mouse_bite         69         42      0.953      0.968       0.98      0.549\n","        open_circuit         69         35      0.943      0.971      0.957      0.502\n","               short         69         67      0.975          1      0.995      0.528\n","                spur         69         36          1      0.916      0.973      0.527\n","     spurious_copper         69         50      0.961       0.98      0.961      0.517\n","Speed: 2.2ms pre-process, 391.7ms inference, 1.6ms NMS per image at shape (2, 3, 2560, 2560)\n","Results saved to \u001b[1mruns/val/v5s\u001b[0m\n","69 labels saved to runs/val/v5s/labels\n"]}]},{"cell_type":"code","source":["!python val.py --weights ./runs/train/yolo_pcb_det2/weights/last.pt --img-size 2544 --data ./data/pcb_data.yaml --augment --save-txt --save-conf --task val --batch-size 2 --verbose --name v5s"],"metadata":{"id":"IBuvAahOS-5V","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1671714999285,"user_tz":-420,"elapsed":40722,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"29024cb4-4641-4782-9595-c36d72e61617"},"execution_count":8,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[34m\u001b[1mval: \u001b[0mdata=./data/pcb_data.yaml, weights=['./runs/train/yolo_pcb_det2/weights/last.pt'], batch_size=2, imgsz=2544, conf_thres=0.001, iou_thres=0.6, task=val, device=, single_cls=False, augment=True, verbose=True, save_txt=True, save_hybrid=False, save_conf=True, save_json=False, project=runs/val, name=v5s, exist_ok=False, half=False\n","YOLOv5 🚀 438c589 torch 1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n","\n","Fusing layers... \n","Model Summary: 223 layers, 7489163 parameters, 0 gradients, 29.6 GFLOPs\n","WARNING: --img-size 2544 must be multiple of max stride 32, updating to 2560\n","\u001b[34m\u001b[1mval: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/val.cache' images and labels... 69 found, 0 missing, 0 empty, 0 corrupted: 100% 69/69 [00:00<?, ?it/s]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 35/35 [00:28<00:00,  1.22it/s]\n","                 all         69        285      0.972      0.979      0.979      0.527\n","        missing_hole         69         55      0.981          1       0.98      0.621\n","          mouse_bite         69         42      0.952      0.976      0.977      0.503\n","        open_circuit         69         35      0.971          1      0.994      0.505\n","               short         69         67      0.971          1      0.995      0.525\n","                spur         69         36          1      0.917      0.971      0.505\n","     spurious_copper         69         50      0.961       0.98      0.957      0.503\n","Speed: 2.2ms pre-process, 393.0ms inference, 1.6ms NMS per image at shape (2, 3, 2560, 2560)\n","Results saved to \u001b[1mruns/val/v5s2\u001b[0m\n","69 labels saved to runs/val/v5s2/labels\n"]}]},{"cell_type":"code","source":["!python val.py --weights ./runs/train/yolo_pcb_det2/weights/best.pt --img-size 2544 --data ./data/pcb_data.yaml --augment --save-txt --save-conf --task test --batch-size 2 --verbose --name v5s"],"metadata":{"id":"Rmsp3T2OPuqZ","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1671715041909,"user_tz":-420,"elapsed":42628,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"e615b177-65e4-424d-b130-533ef24563b5"},"execution_count":9,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[34m\u001b[1mval: \u001b[0mdata=./data/pcb_data.yaml, weights=['./runs/train/yolo_pcb_det2/weights/best.pt'], batch_size=2, imgsz=2544, conf_thres=0.001, iou_thres=0.6, task=test, device=, single_cls=False, augment=True, verbose=True, save_txt=True, save_hybrid=False, save_conf=True, save_json=False, project=runs/val, name=v5s, exist_ok=False, half=False\n","YOLOv5 🚀 438c589 torch 1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n","\n","Fusing layers... \n","Model Summary: 223 layers, 7489163 parameters, 0 gradients, 29.6 GFLOPs\n","WARNING: --img-size 2544 must be multiple of max stride 32, updating to 2560\n","\u001b[34m\u001b[1mtest: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/test' images and labels...70 found, 0 missing, 0 empty, 0 corrupted: 100% 70/70 [00:00<00:00, 292.76it/s]\n","\u001b[34m\u001b[1mtest: \u001b[0mNew cache created: ../datasets/PCB_Dataset-main/labels/test.cache\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 35/35 [00:30<00:00,  1.16it/s]\n","                 all         70        304      0.989      0.992      0.986      0.548\n","        missing_hole         70         92      0.999          1      0.995      0.588\n","          mouse_bite         70         42      0.999          1      0.995      0.607\n","        open_circuit         70         30          1      0.995      0.995      0.593\n","               short         70         42      0.998          1      0.995      0.467\n","                spur         70         48      0.979      0.979      0.983      0.522\n","     spurious_copper         70         50       0.96       0.98      0.951      0.511\n","Speed: 2.6ms pre-process, 408.6ms inference, 1.7ms NMS per image at shape (2, 3, 2560, 2560)\n","Results saved to \u001b[1mruns/val/v5s3\u001b[0m\n","70 labels saved to runs/val/v5s3/labels\n"]}]},{"cell_type":"code","source":["!python val.py --weights ./runs/train/yolo_pcb_det2/weights/last.pt --img-size 2544 --data ./data/pcb_data.yaml --augment --save-txt --save-conf --task test --batch-size 2 --verbose --name v5s"],"metadata":{"id":"ho-fia7LTKSy","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1671715083025,"user_tz":-420,"elapsed":41120,"user":{"displayName":"Hoang Van Manh","userId":"09412009828125765653"}},"outputId":"820d0153-6b43-4dbb-e8e5-bcf54a090375"},"execution_count":10,"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[34m\u001b[1mval: \u001b[0mdata=./data/pcb_data.yaml, weights=['./runs/train/yolo_pcb_det2/weights/last.pt'], batch_size=2, imgsz=2544, conf_thres=0.001, iou_thres=0.6, task=test, device=, single_cls=False, augment=True, verbose=True, save_txt=True, save_hybrid=False, save_conf=True, save_json=False, project=runs/val, name=v5s, exist_ok=False, half=False\n","YOLOv5 🚀 438c589 torch 1.13.0+cu116 CUDA:0 (Tesla T4, 15110MiB)\n","\n","Fusing layers... \n","Model Summary: 223 layers, 7489163 parameters, 0 gradients, 29.6 GFLOPs\n","WARNING: --img-size 2544 must be multiple of max stride 32, updating to 2560\n","\u001b[34m\u001b[1mtest: \u001b[0mScanning '../datasets/PCB_Dataset-main/labels/test.cache' images and labels... 70 found, 0 missing, 0 empty, 0 corrupted: 100% 70/70 [00:00<?, ?it/s]\n","               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 35/35 [00:29<00:00,  1.17it/s]\n","                 all         70        304      0.989      0.989      0.986      0.535\n","        missing_hole         70         92      0.999          1      0.995      0.582\n","          mouse_bite         70         42          1      0.998      0.995      0.563\n","        open_circuit         70         30      0.996          1      0.995      0.605\n","               short         70         42      0.999          1      0.995      0.455\n","                spur         70         48      0.979      0.958      0.982        0.5\n","     spurious_copper         70         50      0.961       0.98      0.955      0.503\n","Speed: 2.3ms pre-process, 404.1ms inference, 1.6ms NMS per image at shape (2, 3, 2560, 2560)\n","Results saved to \u001b[1mruns/val/v5s4\u001b[0m\n","70 labels saved to runs/val/v5s4/labels\n"]}]},{"cell_type":"markdown","source":["# **Ensemble**"],"metadata":{"id":"4d7HwvaLvT3Q"}},{"cell_type":"markdown","source":["If you inference dataset with different models, then you can ensemble the result by weighted boxes fusion using wbf.py.\n","\n","You should set img path and txt path in wbf.py."],"metadata":{"id":"DAesjzBJvWwR"}},{"cell_type":"code","source":["# !python wbf.py"],"metadata":{"id":"FCQK-QAZvRwx"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"mNXGCbZnvbKR"},"execution_count":null,"outputs":[]}],"metadata":{"accelerator":"GPU","colab":{"provenance":[{"file_id":"1_eqH3qkNkhCWekU5pRVTZOMesKsnvb_h","timestamp":1671695723707}],"machine_shape":"hm"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"},"gpuClass":"premium"},"nbformat":4,"nbformat_minor":0}